package com.yunji.common.base;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yunji.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * Entity基类
 *
 * @author yunji
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BaseDTO extends PageDTO implements Serializable, ParamsHandleDTO {
    private static final long serialVersionUID = -8715424234155330590L;

    /**
     * 搜索值
     */
    @JsonIgnore
    @TableField(exist = false)
    private String searchValue;

    /**
     * 备注
     */
    @ApiModelProperty("备注")
    @TableField(exist = false)
    private String remark;

    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty("备注")
    @TableField(exist = false)
    private String remarks;

    /**
     * 创建者
     */
    @Excel(name = "创建者")
    @ApiModelProperty("创建者")
    @TableField(exist = false)
    private String createBy;

    /**
     * 更新者
     */
    @Excel(name = "更新者")
    @ApiModelProperty("更新者")
    @TableField(exist = false)
    private String updateBy;

    @Excel(name = "创建时间")
    @ApiModelProperty("创建时间")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新者
     */
    @Excel(name = "更新时间")
    @ApiModelProperty("更新时间")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
